package com.ys.filelib.filedialog.adapter;


import com.ys.filelib.R;
import com.ys.filelib.filedialog.FilePath;
import com.ys.filelib.filedialog.adapter.base.BaseViewHolder;
import com.ys.filelib.filedialog.adapter.base.QuickAdapter;

public class FilePathsAdapter extends QuickAdapter<FilePath> {


    public FilePathsAdapter() {
        super(R.layout.filelib_item_file_path);
    }

    @Override
    protected void convert(BaseViewHolder holder, FilePath item) {
        holder.setText(R.id.tv_name, item.name);
        holder.setGone(R.id.iv_image, holder.getLayoutPosition() == 0);
    }

    public void clear() {
        getData().clear();
        notifyDataSetChanged();
    }

}
